package com.shisfish.library.Impl;

import java.util.List;
import java.util.Map;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IMediaInter;
import com.shisfish.library.Model.Media;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class MediaImpl implements IMediaInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	private IMediaInter mapper = (IMediaInter) ac.getBean("mediaMapper");
	
	@Override
	public int insertOne(Media t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<Media> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateOne(Media t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<Media> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Media> selectById(int id) {
		// TODO Auto-generated method stub
		return mapper.selectById(id);
	}

	@Override
	public List<Media> selectByKey(String key) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Media> selectAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return mapper.deleteOneById(id);
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int countByType(int type) {
		// TODO Auto-generated method stub
		return mapper.countByType(type);
	}

	@Override
	public List<Map<String, Object>> selectByTypePage(int type, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByTypePage(type, currentPage, pageSize);
	}

	@Override
	public Map<String, Object> selectId(int id) {
		// TODO Auto-generated method stub
		return mapper.selectId(id);
	}

	@Override
	public List<Map<String, Object>> selectByFcode(int fcode) {
		return mapper.selectByFcode(fcode);
	}

	public int countByCho(String cho) {
		// TODO Auto-generated method stub
		return mapper.countByCho(cho);
	}

	public List<Map<String, Object>> selectByChoPage(String cho,
			int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByChoPage(cho, currentPage, pageSize);
	}

}
